3.4 \(\int (a+b \sec ^2(e+f x)) \sin (e+f x) \, dx\)

Optimal. Leaf size=24 \[ \frac{b \sec (e+f x)}{f}-\frac{a \cos (e+f x)}{f} \]

[Out]

-((a*Cos[e + f*x])/f) + (b*Sec[e + f*x])/f

________________________________________________________________________________________

Rubi [A]  time = 0.0202495, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {4133, 14} \[ \frac{b \sec (e+f x)}{f}-\frac{a \cos (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)*Sin[e + f*x],x]

[Out]

-((a*Cos[e + f*x])/f) + (b*Sec[e + f*x])/f

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \left (a+b \sec ^2(e+f x)\right ) \sin (e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{b+a x^2}{x^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a+\frac{b}{x^2}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{a \cos (e+f x)}{f}+\frac{b \sec (e+f x)}{f}\\ \end{align*}

Mathematica [A]  time = 0.0175184, size = 35, normalized size = 1.46 \[ \frac{a \sin (e) \sin (f x)}{f}-\frac{a \cos (e) \cos (f x)}{f}+\frac{b \sec (e+f x)}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)*Sin[e + f*x],x]

[Out]

-((a*Cos[e]*Cos[f*x])/f) + (b*Sec[e + f*x])/f + (a*Sin[e]*Sin[f*x])/f

________________________________________________________________________________________

Maple [A]  time = 0.019, size = 25, normalized size = 1. \begin{align*}{\frac{1}{f} \left ( b\sec \left ( fx+e \right ) -{\frac{a}{\sec \left ( fx+e \right ) }} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)*sin(f*x+e),x)

[Out]

1/f*(b*sec(f*x+e)-1/sec(f*x+e)*a)

________________________________________________________________________________________

Maxima [A]  time = 1.0071, size = 34, normalized size = 1.42 \begin{align*} -\frac{a \cos \left (f x + e\right ) - \frac{b}{\cos \left (f x + e\right )}}{f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e),x, algorithm="maxima")

[Out]

-(a*cos(f*x + e) - b/cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 0.900601, size = 57, normalized size = 2.38 \begin{align*} -\frac{a \cos \left (f x + e\right )^{2} - b}{f \cos \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e),x, algorithm="fricas")

[Out]

-(a*cos(f*x + e)^2 - b)/(f*cos(f*x + e))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \sin{\left (e + f x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)*sin(f*x+e),x)

[Out]

Integral((a + b*sec(e + f*x)**2)*sin(e + f*x), x)

________________________________________________________________________________________

Giac [A]  time = 1.29776, size = 38, normalized size = 1.58 \begin{align*} -\frac{a \cos \left (f x + e\right )}{f} + \frac{b}{f \cos \left (f x + e\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)*sin(f*x+e),x, algorithm="giac")

[Out]

-a*cos(f*x + e)/f + b/(f*cos(f*x + e))